home *** CD-ROM | disk | FTP | other *** search
/ Ozsi 13 / Ozsi_13_199x_Tide_Side_A.d64 / dir booter basic (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  3KB  |  96 lines

  1. 0 poke808,234
  2. 1 clr:dimpr$(144):dimv$(33)
  3. 2 poke53280,0:poke53281,0:poke646,15:goto17
  4. 3 print"":fori=0to15:forj=0tonc:printtab(j*20);spc(1);v$(i+j*16);
  5. 4 nextj:print:nexti:poke198,0:rl%=0:cl%=0:gosub16
  6. 5 getcc$:on-(cc$="")goto5:z%=asc(cc$):tc%=cl%:tr%=rl%
  7. 6 if(z%and127)=29thencl%=(cl%+1+2*(z%=157))andnc
  8. 7 if(z%and127)=17thenrl%=(rl%+1+2*(z%=145))and15
  9. 8 ifz%=13thenr$="next":return
  10. 9 ifz%=133thenr$="list":return
  11. 10 ifz%=135thenr$="?"+chr$(34)+"[147]"+chr$(34):return
  12. 11 ifz%=136thenr$="run":return
  13. 12 ifv$(rl%+cl%*16)=""then:goto6
  14. 13 if(tc%<>cl%)or(tr%<>rl%)thengosub15
  15. 14 goto 5
  16. 15 poke214,tr%+2:print:printtab(tc%*20);spc(1);v$(tr%+16*tc%)
  17. 16 poke214,rl%+2:print:printtab(cl%*20);spc(1);"";v$(rl%+16*cl%):return
  18. 17 print"[147]":nc=1:nv=(nc+1)*16-1:ma=-1
  19. 18 print"           loading directory"
  20. 19 open15,8,15,"i":input#15,e1$,e2$,e3$,e4$
  21. 20 ife1$<>"00"thenprint"[147]error:"e1$;e2$;e3$;e4$:end
  22. 21 poke53265,peek(53265)and239:close15:open 15,8,15,"ui-":open2,8,2,"#"
  23. 22 print#15,"u1: 2 0 18 0":print#15,"b-p";2;144:he$=""
  24. 23 forx=1to16:get#2,x$:he$=he$+x$:next
  25. 24 print#15,"b-p";2;162:id$=""
  26. 25 forx=1to2:get#2,x$:id$=id$+x$:next
  27. 26 close2:close15
  28. 27 he$="name:"+he$:he$=he$+"id:"+id$+"  v1.0"
  29. 28 open 15,8,15,"i0":open2,8,2,"#":t=18:s=1
  30. 29 print#15,"u1:";2;0;t;s:print#15,"b-p";2;0
  31. 30 get#2,t$,s$:t$=t$+chr$(0):t=asc(t$):s$=s$+chr$(0):s=asc(s$)
  32. 31 forx=0to7:print#15,"b-p";2;x*32+2
  33. 32 get#2,x$,t$,s$:x$=x$+chr$(0):a%=asc(x$)and15:ifa%<>2then34
  34. 33 ma=ma+1:fory=0to15:get#2,x$:pr$(ma)=pr$(ma)+x$:next y
  35. 34 next x:if t=0then36
  36. 35 goto29
  37. 36 close2::print#15,"ui+":close15:poke53265,peek(53265)or16
  38. 37 np=0:sl=0
  39. 38 sl=sl+np:np=ma-sl+1:ifnp>nvthennp=nv
  40. 39 ifnp=0then43
  41. 40 fori=1tonv:v$(i)="":next:fori=0tonp:v$(i)=pr$(sl+i):next:gosub58
  42. 41 gosub3:ifr$="next"then38
  43. 42 poke139,128:goto51
  44. 43 gosub70
  45. 44 v$(1)="see new disk":v$(2)="restart this disk":v$(3)="quit"
  46. 45 np=3:gosub83
  47. 46 on rl% gosub 48,49,50
  48. 47 goto 43
  49. 48 run
  50. 49 nc=1:goto37
  51. 50 print"[147]":end
  52. 51 poke53265,peek(53265)and239:close15:open 15,8,15,"ui-":close15
  53. 52 print"[147]load"chr$(34)v$(rl%+16*cl%)chr$(34)",8,1"
  54. 53 print"p[207]53265,p[197](53265)or16:o[208]15,8,15,"chr$(34)"ui+"chr$(34)":"r$
  55. 54 poke631,19:poke632,13:poke633,13:poke198,3:end
  56. 55 rem*----------------------------*
  57. 56 rem* output menu screen         *
  58. 57 rem*----------------------------*
  59. 58 printchr$(142);:print"[147][176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
  60. 59 print"[194]";tab((40-len(he$))/2)he$;tab(38)"[194]"
  61. 60 print"[171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][178][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  62. 61 forx=1to16:print"[194]";tab(19)"[194]";tab(38)"[194]":next
  63. 62 print"[171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][177][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  64. 63 forx=1to2:print"[194]";tab(38)"[194]":next
  65. 64 bm$="f1=load/list  f5=load  f7=load/run":
  66. 65 xt=(40-len(bm$))/2:print"[194]";tab(xt)bm$;tab(38)"[194]"
  67. 66 print"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]":return
  68. 67 rem*----------------------------*
  69. 68 rem* output main screen         *
  70. 69 rem*----------------------------*
  71. 70 printchr$(142);:print"[147][176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
  72. 71 tm$="no more programs on disk dude!"
  73. 72 print"[194]";tab((40-len(tm$))/2)tm$;tab(38)"[194]"
  74. 73 print"[171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  75. 74 forx=1to19:print"[194]";tab(38)"[194]":next
  76. 75 ifp=1thenforx=1to2:print"[194]";tab(38)"[194]":next:p=0:goto79
  77. 76 print"[171][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][179]"
  78. 77 bm$="select option"
  79. 78 print"[194]";tab((40-len(bm$))/2)bm$;tab(38)"[194]"
  80. 79 print"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]";:return
  81. 80 rem*----------------------------*
  82. 81 rem cursor get
  83. 82 rem*----------------------------*
  84. 83 print"":fori=1tonp:printtab(10);v$(i):next
  85. 84 poke198,0:rl%=1:gosub94
  86. 85 getcc$:on-(cc$="")goto85
  87. 86 z%=asc(cc$):tr%=rl%
  88. 87 if(z%and127)=17thenrl%=(rl%+1+2*(z%=145))
  89. 88 ifrl%>npthenrl%=rl%-np
  90. 89 ifrl%=0orrl%=-1thenrl%=1
  91. 90 ifz%=13thenreturn
  92. 91 iftr%<>rl%thengosub93
  93. 92 goto85
  94. 93 poke214,tr%+2:print:printtab(10);v$(tr%)
  95. 94 poke214,rl%+2:print:printtab(10);"";v$(rl%):return
  96.